import request from '@/utils/request.js'
const PATH = '/user/collect'

// 添加收藏
export const addCollect = (data) => {
  console.log(data)

  return request.post(PATH + '/addCollect', data)
}

// 删除收藏
export const delCollect = ({ type, typeId, userId }) => {
  return request.delete(PATH + '/delCollect', {
    params: {
      type,
      typeId,
      userId
    }
  })
}

// 获取收藏列表
export const getCollectList = ({ page, pageSize, userId, type }) => {
  return request.get(PATH + '/pageQuery', {
    params: {
      page,
      pageSize,
      userId,
      type
    }
  })
}
